<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.netscenery.yang.model.Validator"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Notice</title>
    
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/items.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/subItems.css" />
    <script type="text/javascript"  src="<%=basePath %>jstree-v.pre1.0/_lib/jquery.js"></script>


  </head>
  <style type="text/css">
    body{
	   margin:0px;
	   padding:0px;
	   }
   .NoticeDiv{
	   border:1px solid;
	   border-color:#EAEAEA #FFFFFF #B3B3B3 #FFFFFF;
	   text-align:center;
	   width: 700px;
	   position:absolute;
	   display:block;
	   padding:5px;
   }
   .NoticeTitle{
	   font-size:24px;
	   color:#5aa608;
	   text-align:center;
   }
   .NoticeSpan{
	   color:red;
	   font-weight:bold;
   }
</style>

  <body onload="LoadNotice()">
  <script type="text/javascript">
  function LoadNotice(){
	screenwidth     = $(document).width();          
	screenheight    = $(document).height();                    //获取滚动条距顶部的偏移      
	mytop           = $(document).scrollTop();               //计算弹出层的left  
	var myheight    = $(".NoticeDiv").height();
	var mywidth     = $(".NoticeDiv").width(); 
	getPosLeft      = (screenwidth - mywidth)/2;             //计算弹出层的top        
	getPosTop       = (screenheight - myheight)/2 -50 ; 
	$(".NoticeDiv").css({ "left": getPosLeft, "top": getPosTop });
  }
  $(document).ready(function(){
        LoadNotice();
  })
</script>
     <div class="NoticeDiv">
       <div class="itemTitle NoticeTitle">操作提示</div>
       <div style="text-align:center; color:red;font-weight:bold;">
          <%=request.getAttribute("msg") %>
          <br/>
          <%
	       if(null != request.getAttribute("validator")){ 
	       %>
	       <div style="overflow:auto;max-height:120px;padding:2px;border:1px dotted #333;color:#000;font-size:14px;text-align:left;">
	       <%
	          Validator validator = (Validator)request.getAttribute("validator");
	          for(int i = 0 ; i < validator.getMsgsNumber(); i++){
	          if(validator.getMsg(i).getSeverity().getFieldName().equalsIgnoreCase("Warning")){
	              continue;
	          }
	       %>
	       		 <%=validator.getMsg(i).toString() %><br/>
	       <%   	  
	          }
	       %>
	       </div>
	       <%
	       }else{ %>
           <br/><br/><br/>
           <%} %>
          
          
          <% if(null != request.getAttribute("source")){ 
             String sourceUrl = request.getAttribute("source").toString();
          %>
          <a href="<%=basePath + sourceUrl %>"> &gt;&gt;返回</a>
          <%} %>
        </div>
     </div>
       
       
  </body>
</html>
